package com.cms.recursoshumanos.container;

import net.rim.device.api.ui.container.VerticalFieldManager;

public class SizebleVFManager extends VerticalFieldManager
{
    int mWidth = 0;
    int mHeight = 0;
    public SizebleVFManager(int width, int height, long style) 
    {
        super(style);
        mWidth = width;
        mHeight = height;
    }

    public SizebleVFManager(int width, int height) 
    {
        mWidth = width;
        mHeight = height;
    }

    public int getPreferredWidth() 
    {
        return mWidth;
    }

    public int getPreferredHeight() 
    {
        return mHeight;
    }

    protected void sublayout(int width, int height) 
    {
        width = getPreferredWidth();
        height = getPreferredHeight();  
        super.sublayout(width, height); 
        setExtent(width, height);
    }
}
